Node.js is a JavaScript run-time environment for executing JavaScript code on a server side. Historically, JavaScript was used primarily for client-side scripting, in which scripts written in JavaScript are embedded in a webpage's HyperText Markup Language (HTML), to be run on a client side by a JavaScript engine in a user's web browser. Node.js enables JavaScript to be used for server-side scripting, and runs scripts on a server side to produce dynamic web page content before the page is sent to the user's web browser. Node.js is based on Google V8 JavaScript engine.
Typically, a JavaScript-based server only has a single thread. Unlike a JAVA server has multiple threads for parallel processing of multiple processes simultaneously, a JavaScript-based server executes multiple processes asynchronously. Node.js is an asynchronous execution platform. In an asynchronous execution environment, when a blocking operation (for example, input/output (I/O)) is going to be executed, the blocking operation itself is executed asynchronously at a later time. For example, the blocking operation itself is executed when no other operations needed to be performed and the blocking operation itself can be performed without blocking (for example, because the needed bytes have already been read from a file).